﻿@model Transport.Areas.Administrator.Models.UserModel
@{
    ViewBag.Title = "Đợt phát";
    Layout = "~/Areas/Administrator/Views/Shared/_Layout.cshtml";
}
<div class="section-header">
    <div class="title">
        <img src="@Url.Content("~/Areas/Administrator/Content/images/ico-catalog.png")" alt="" />
        Thông tin nhân viên
    </div>
    <div class="options">
        <a href="@Url.Action("index")" tabindex="8" class="t-button">Quay về</a>
    </div>
</div>
<table width="99%">
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Tên nhân viên")
            </td>
            <td class="adminData">
                <input type="text" value="@(Model.FirstName + " " + Model.LastName)" style="background:#ebebe4" id="FirstName" disabled="disabled">
            </td>
        </tr>
        <tr>
            <td width="100" class="adminTitle">
                @Html.Label("Email")
            </td>
            <td class="adminData">
                @Html.TextBoxFor(model => model.Email, new { disabled = "disabled", style = "background:#ebebe4" })
            </td>
        </tr>
    </table>

<div class="section-header">
    <div class="title">
        <img src="@Url.Content("~/Areas/Administrator/Content/Images/ico-catalog.png")" alt="" />
        Danh sách các đợt phát
    </div>
    <div class="options">
        <a href="@Url.Action("Create", "ParcelDelivery", new { id = Model.UserId})" class="t-button">Tạo mới</a>
    </div>
</div>
@(Html.Telerik().Grid<Transport.Areas.Administrator.Models.ParcelDeliveryGroupModel>()
    .Name("Grid")
    .Columns(columns =>
    {
        columns.Bound(x => x.ParcelDeliveryGroupId).Title("MS")
            .Width(70)
            .Filterable(false);
        columns.Bound(x => x.CreateUser).Title("Người Tạo")
            .Filterable(false);
        columns.Bound(x => x.CreateDate).Title("Ngày Tạo").Format("{0:dd/MM/yyyy HH:mm:ss}")
            .Width(200)
            .Filterable(false);
        columns.Bound(p => p.ParcelDeliveryGroupId)
            .ClientTemplate("<a href=" + Url.Action("Edit", "ParcelDelivery", new { }) + "/<#= ParcelDeliveryGroupId #>><img title=\"Sửa\" src=\"" + Url.Content("~/Content/Images/edit_16_16.png") + "\" /></a>")
            .HtmlAttributes(new { style = "text-align:center" })
            .Title(string.Empty)
            .Width(60).Sortable(false)
            .Filterable(false);
    }).Sortable(p => p.OrderBy(o => o.Add(b => b.ParcelDeliveryGroupId).Descending()))
    .DataBinding(dataBinding => dataBinding.Ajax().Select("GridDeliveryGroupModel", "ParcelDelivery", new { id = Model.UserId }))
    .Pageable()
    .Scrollable()
    .Groupable(grouping => grouping.Enabled(false))
    .Filterable())